﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfAutorizacionOC.aspx.cs" Inherits="wfCompras.WfAutorizacionOC" %>

<%@ Register src="ucControlFecha.ascx" tagname="ucControlFecha" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../Styles/General.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
   
    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 5px;
            height: 15px;
        }
        .style2
        {
            height: 15px;
        }
        .style3
        {
            width: 10px;
            height: 15px;
        }
        .style4
        {
            width: 5px;
            height: 26px;
        }
        .style5
        {
            height: 26px;
        }
        .style6
        {
            width: 10px;
            height: 26px;
        }
        .style13
        {
            height: 26px;
            width: 147px;
        }
        .style14
        {
            height: 15px;
            width: 147px;
        }
        .style16
        {
            width: 20px;
        }
        .style20
        {
            height: 26px;
            width: 57px;
        }
        .style21
        {
            height: 15px;
            width: 57px;
        }
        .style22
        {
            width: 57px;
        }
        .style26
        {
            width: 147px;
        }
        .style27
        {
            width: 142px;
        }
        .style28
        {
            height: 26px;
            width: 142px;
        }
        .style29
        {
            height: 15px;
            width: 142px;
        }
        .style30
        {
            width: 206px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
   <asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>
 <input id="dummy" type="button" style="display: none" runat="server" />

   <asp:UpdatePanel ID="udpInnerUpdatePanel" runat="Server" UpdateMode="Conditional">
      <ContentTemplate>
        <table width="100%" cellpadding="0" cellspacing="2">
            <tr>
                <td colspan="3">
                    <div class="modalPopupHeader">
                        &nbsp;&nbsp;&nbsp;<asp:Label ID="lblTitlePopup" runat="server"></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td>
                    <table width="100%" cellpadding="0" cellspacing="2">
                        <tr>
                            <td>
                                <div style="border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px;
                                    -webkit-border-radius: 5px; -ms-border-radius: 5px;">
                                    <table width="100%" cellpadding="0" cellspacing="2">
                                    <tr>
                                            <td style="width: 5px;">
                                                &nbsp;
                                            </td>
                                            <td class="style22">
                                                Fecha Inicio
                                            </td>
                                            <td class="style27">
                                                <uc1:ucControlFecha ID="ucControlFecha1" runat="server" />
                                            </td>
                                            <td style="margin-left: 40px;" class="style16">
                                                <asp:TextBox ID="TextBox1" runat="server" BorderStyle="None" Enabled="False" 
                                                    Height="15px" Width="20px"></asp:TextBox>
                                                <br />
                                            </td>
                                            <td class="style26">
                                                <asp:CheckBox ID="chkPendiente" runat="server" Text="Pendiente" />
                                            </td>
                                            <td>
                                                    &nbsp;</td>
                                            <td style="width: 10px;">
                                                  Planta

                                            </td>
                                            <td class="style30">
                                               
                                                <asp:DropDownList ID="dbPlanta" runat="server" Width="200px" 
                                                    AutoPostBack="True">
                                                </asp:DropDownList>
                                               
                                            </td>
                                            <td>
                                                <asp:Button ID="btnBuscar3" runat="server" CssClass="esdButtonStyle" 
                                                    onclick="btnBuscar3_Click" Text="Buscar" Width="80px" />
                                            </td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 5px;">
                                                &nbsp;<asp:Button ID="btnBuscar" runat="server" CssClass="esdButtonStyle" 
                                                    Text="Autorizar" Width="80px" onclick="btnBuscar_Click" />
                                            </td>
                                        </tr>
                                        
                                       
                                        <tr>
                                            <td class="style4">
                                            </td>
                                            <td class="style20">
                                                Fecha Fin</td>
                                            <td class="style28">
                                                <uc1:ucControlFecha ID="ucControlFecha2" runat="server" />
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox2" runat="server" BackColor="#CCCCCC" 
                                                    BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style13">
                                                <asp:CheckBox ID="chk_nAutoriza" runat="server" Text="No autorizar" />
                                            </td>
                                            <td class="style5">
                                            </td>
                                            <td class="style6">
                                            </td>
                                            <td class="style5" colspan="2">
                                            </td>
                                            <td class="style5">
                                            </td>
                                            <td class="style4">
                                                <asp:Button ID="btnBuscar0" runat="server" CssClass="esdButtonStyle" 
                                                    Text="No Autorizar" Width="80px" onclick="btnBuscar0_Click" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style1">
                                            </td>
                                            <td class="style21">
                                            </td>
                                            <td class="style29">
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox3" runat="server" BackColor="#FFCC99" 
                                                    BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style14">
                                                <asp:CheckBox ID="chkAutoriza" runat="server" Text="Autorizadas" />
                                            </td>
                                            <td class="style2">
                                            </td>
                                            <td class="style3">
                                            </td>
                                            <td class="style2" colspan="2">
                                            </td>
                                            <td class="style2">
                                            </td>
                                            <td class="style1">
                                                <asp:Button ID="btnBuscar1" runat="server" CssClass="esdButtonStyle" 
                                                    Text="Habilitar" Width="80px"  />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 5px;">
                                                &nbsp;</td>
                                            <td class="style22">
                                                &nbsp;</td>
                                            <td class="style27">
                                                <asp:Button ID="btnActualizar" runat="server" CssClass="esdButtonStyle" 
                                                  Text="Actualizar" Width="80px" />
                                            </td>
                                            <td class="style16">
                                                &nbsp;</td>
                                            <td class="style26">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 10px;">
                                                &nbsp;</td>
                                            <td colspan="2">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 5px;">
                                                <asp:Button ID="btnBuscar2" runat="server" CssClass="esdButtonStyle" 
                                                    Text="Salir" Width="80px" />
                                            </td>
                                        </tr>
                                        
                                       
                                    </table>

                                </div>

                            </td>
                        </tr>
                               <caption>
                                    <tr align="center">
                                        <td>
                                            <div style="border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px;
                                    -webkit-border-radius: 5px; -ms-border-radius: 5px;">
                                                <table cellpadding="0" cellspacing="2" width="100%">
                                         
                                                    <tr align="center">
                                                    <div style="overflow: auto; width: 1100px" >
                                                        <div class="DataDetail">
                                                        <asp:GridView ID="gvListar" runat="server" AllowPaging="True" 
                                                            AllowSorting="True" AutoGenerateColumns="False" CellPadding="0" 
                                                            GridLines="None" ShowFooter="True" Width="750px" 
                                                                onpageindexchanging="gvListar_PageIndexChanging" PageSize="20" >
                                                           
                                                            <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
                                                            <Columns>

                                                                <%--<asp:BoundField DataField="Codigo" HeaderText="Codigo" />--%>
                                                        
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("id_periodo") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="#O/C">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblId_Ordenco" runat="server" Text='<%# Bind("id_ordenco") %>' 
                                                                            Width="50px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Origen OC">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("origen") %>' Width="70px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="#Conso/Req">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("consoreq") %>' 
                                                                            Width="100px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="#Cotizacion">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("cotiza") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Condición">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("ds_condpago") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Proveedor">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("ds_raznombre") %>' 
                                                                            Width="120px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("fe_ordenco") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label9" runat="server" Text='<%# Bind("id_importa") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Fecha">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label10" runat="server" Text='<%# Bind("fe_entrega") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label11" runat="server" Text='<%# Bind("id_local") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Pedido En">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label12" runat="server" Text='<%# Bind("plantaent") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>

                                                                <asp:TemplateField HeaderText="Emitido Por">
                                                                  
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label17" runat="server" Text='<%# Bind("emitidap") %>' 
                                                                            Width="200px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>

                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label13" runat="server" Text='<%# Bind("id_personal") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label14" runat="server" Text='<%# Bind("pedidop") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                
                                                                <asp:TemplateField HeaderText="Entregar En">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label15" runat="server" Text='<%# Bind("plantapedido") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label16" runat="server" Text='<%# Bind("id_personal2") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Prioridad">
                                                             
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label18" runat="server" Text='<%# Bind("priorid") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Monto">
                                                          
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label19" runat="server" Text='<%# Bind("mt_total") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                     <ItemTemplate>
                                                                        <asp:Label ID="Label20" runat="server" Text='<%# Bind("id_modcomp") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Mod.Compra">
                                                                      <ItemTemplate>
                                                                        <asp:Label ID="Label21" runat="server" Text='<%# Bind("modcomp") %>' 
                                                                              Width="100px"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label22" runat="server" Text='<%# Bind("tipocomp") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Mnda">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label23" runat="server" Text='<%# Bind("moneda") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Autorizado Por">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label24" runat="server" Text='<%# Bind("autorizapor") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="False">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Label25" runat="server" Text='<%# Bind("st_ordenco") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField Visible="true">
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox ID="chkBxSelect" runat="server" Text=" " />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <HeaderStyle CssClass="esdGridHeaderStyle" />
                                                            <PagerStyle CssClass="gridPagerStyle" />
                                                            <RowStyle CssClass="esdGridRowStyle" />
                                                            <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                                                        </asp:GridView>
                                                        </div>
                                                        </div>
                                                        <td>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                </caption>
                     
                    </table>
                </td>
                <td style="width: 5px;">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td align="right">
                    <asp:Button ID="bttOkPopup" runat="server" Text="Aceptar" Width="80px"  >
                     
                    </asp:Button>
                    <asp:Button ID="bttCancelPopup" runat="server" Text="Cancelar" Width="80px"></asp:Button>
                </td>
                <td style="width: 5px;">
                    &nbsp;
                </td>
            </tr>

        </table>
     </ContentTemplate>

      </asp:UpdatePanel>
 

  <asp:HiddenField ID="hdnidCliProv" runat="server" />


    </form>
</body>
</html>
